package com.cao.project.domain;

import java.io.Serializable;
import java.util.Date;

import com.cao.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.cao.common.annotation.Excel;

/**
 * 项目成员：存储项目与用户的关系对象 pro_project_member
 *
 * @author cao
 * @date 2025-03-03
 */
@Data
@TableName(value = "pro_project_member")
public class ProjectMember extends BaseEntity implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 记录ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 项目ID
     */
    @Excel(name = "项目ID")
    @TableField(value = "project_id")
    private Long projectId;

    /**
     * 项目名称
     */
    @Excel(name = "项目名称")
    @TableField(value = "project_name")
    private String projectName;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 用户名称
     */
    @Excel(name = "用户名称")
    @TableField(value = "user_name")
    private String userName;

    /**
     * 用户在项目中的角色
     */
    @Excel(name = "用户在项目中的角色")
    @TableField(value = "role")
    private String role;

    /**
     * 加入时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "加入时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value = "joined_at")
    private Date joinedAt;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value = "modified_at")
    private Date modifiedAt;


}
